<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0,user-scalable=no">
    <title>微信支付-公众号建设服务平台</title>
    <link rel="shortcut icon" href="__IMG__/favicon.ico" type="image/vnd.microsoft.icon"/>
    <title>微信扫码支付</title>
    <style type="text/css">
        * {
            margin: 0;
            padding: 0;
        }

        body {
            font: 14px Microsoft YaHei, \5FAE\8F6F\96C5\9ED1, SimSun, \5B8B\4F53, Arial, Verdana;
            color: #000;
            text-align: left;
            padding-top: 3%;
            background: #FFF;
        }

        a:link, a:visited {
            color: #F00;
            text-decoration: none;
        }

        a:hover {
            color: #090;
            text-decoration: underline;
        }

        img {
            border: 0 none;
            vertical-align: middle;
        }

        .wenxin {
            width: 100%;
            height: auto;
            overflow: hidden;
            text-align: center;
        }

        .top {
            width: 60%;
            height: auto;
            overflow: hidden;
            line-height: 40px;
            margin: 0 auto 20px;
            padding: 5px 15px;
            text-align: left;
            border: 2px solid #E6E6E6;
            background: #FFF;
        }

        .top span {
            float: left;
        }

        .top span.a {
            color: #390;
            font-size: 16px;
            font-weight: bold;
            margin-right: 10px;
        }

        .top span.b {
            color: #999;
        }

        .top span.c {
            float: right;
        }

        .codeimg {
            height: 270px;
            text-align: center;
        }

        .bottom {
            padding: 5px 10px;
            color: #090;
        }

        .codeimg img {
            width: 220px;
            height: 220px;
            padding: 8px;
            border: 8px solid #F2F2F2;
        }

        @media (max-width: 500px) {
            .top {
                width: 80%;
                line-height: 25px;
                padding: 5px 3%;
            }

            .top span {
                float: left;
                display: block;
            }
        }

        .tipsToPay {
            width: 305px;
            overflow: hidden;
            padding: 15px;
            background: #fff;
            border: 5px solid #adadad;
            z-index: 102;
            border-radius: 3px;
            position: absolute;
            top: 20%;
            left: 50%;
            margin-left: -150px;
            display: none;
        }

        .tipsToPay p {
            text-align: center;
            padding: 20px 20px 10px;
            line-height: 24px;
        }

        .tipsToPay p a {
            color: #fff;
            text-decoration: none;
        }

        .tipsToPay p a:hover {
            color: #fff;
            text-decoration: none;
        }

        .tipsToPayBtn {
            display: inline-block;
            padding: 0 10px;
            margin: 0 10px;
            color: #fff;
            line-height: 21px;
            height: 21px;
            border: 1px solid #f90;
            background: #f90;
            border-radius: 3px;
        }
    </style>

    <script>
        var _hmt = _hmt || [];
        (function() {
            var hm = document.createElement("script");
            hm.src = "https://hm.baidu.com/hm.js?e2b4b19d9b88c4480a25e66cb96aeba4";
            var s = document.getElementsByTagName("script")[0];
            s.parentNode.insertBefore(hm, s);
        })();
    </script>
</head>
<body>
<div class="wenxin">
    <div class="top">
        <span class="a"><img src="__IMG__/wx_g.gif"> <strong>微信支付</strong></span>
        <span class="b">亿万用户选择，更快更安全！</span>
        <span class="c">
            支付：<strong style="font-size:18px; color:#F60;">{$price}</strong>元
        </span>
    </div>
    <div id="pay_success" style="display: none; background: #fff; width: 100%;">
        <p style=" width: 60%; font-size: 18px; line-height: 30px; margin: 10% auto 0; text-align: left;">
            <img src="__IMG__/wx_g.gif"  style="width: 24px;"> 您的订单已成功提交，工作人员会在2个工作日内与您的qq联系，指导您搭建安装，客服qq：客服的上班时间为周一至周五早9点至下午5点，节假日正常休息，其余时间您可以添加客服qq后留言，客服上班后会一一答复。
            <a class="qq-web" href="tencent://AddContact/?fromId=45&fromSubId=1&subcmd=all&uin={$qq}&website=www.oicqzone.com">{$qq}</a>(点击可以直接添加客服QQ)。
        </p>
    </div>
    <div class="codeimg"><img src="http://pan.baidu.com/share/qrcode?w=200&h=200&url={$qrcode}"></div>
    <div class="bottom">
        <img src="__IMG__/sm.gif"> 请用手机登陆微信，扫描上面的二维码完成付款。<br/>
        <span style="color:#FF0000;">注意付款时，在备注中填写您的联系电话</span><br/>
        <span style="color:#FF0000;">如有疑问，请<a href="http://p.qiao.baidu.com/cps/chatIndex?reqParam=%7B%22from%22%3A0%2C%22sid%22%3A%22-100%22%2C%22tid%22%3A%226825%22%2C%22ttype%22%3A1%2C%22siteId%22%3A%224282468%22%2C%22userId%22%3A%222638276%22%2C%22pageId%22%3A0%7D" target="_blank" style="color: #00a0e9;">联系客服</a></span>
    </div>
</div>
<div class="tipsToPay" id="pay_qrcode_show">
    <img src="__IMG__/close.png" style="position: absolute;right: 3px; top: 3px;" onclick="pay_code_close();"/>
    <p>完成支付后根据您的情况点击下面按钮</p>
    <p>
        <a href="###" class="tipsToPayBtn" id="showOrderId" onclick="pay_success();">已完成支付</a>
        <a href="###" class="tipsToPayBtn" id="repayOrder" onclick="pay_code_close();">支付失败</a>
    </p>
</div>

<script type="text/javascript" src="__JS__/jquery.js"></script>
<script>

    // setTimeout('pay_code_show()',120000);
    var getPayResult = setInterval(function () {
        $.ajax({
            url:"/home/index/get_pay_result",
            type:"post",
            data:{ uuid:'{$uuid}' },
            success:function(data){
                if (data.status == 1) {
                    window.clearInterval(getPayResult);
                    pay_success();
                } else {
                    // nothing
                    console.log('未支付');
                }
            }
        });
    }, 5000);

    function pay_code_show() {
        $("#pay_qrcode_show").show();
    }

    function pay_code_close() {
        $("#pay_qrcode_show").hide();
//        setTimeout('pay_code_show()',120000);
        getPayResult = setInterval(function () {
            $.ajax({
                url:"/OpenApplyOfficial/get_pay_result",
                type:"post",
                data:{ uuid:'{$_GET["uuid"]}' },
                success:function(data){
                    if (data.result == 1) {
                        window.clearInterval(getPayResult);
//                        pay_success();
                        window.location.href = "{:U('OpenApplyOfficial/pay_finish',array('uuid'=>$apply_info['uuid']))}";
                    } else {
                        // nothing
                        console.log('未支付');
                    }
                }
            });
        }, 5000);
    }

    function pay_success() {
        $("#pay_qrcode_show").hide();
        $(".codeimg").hide();
        $(".bottom").hide();
        $("#pay_success").show()
    }
</script>

</body>
</html>
